import { observable, action, computed, autorun, toJS } from 'mobx';
import { WeaLocaleProvider, WeaTools } from 'ecCom';

const getLabel = WeaLocaleProvider.getLabel;


class TransportStore {
   // 传输框组件数据
   @observable frameData = {
      isFold: true,
      cancelAll: true,
      canJump: false,
      data: [],
      countAll: 0,
      countUp: 0,
      nowPath: [],
   };
   // 修改setFrame
   @action setFrameData = (data = {}) => {
      for (let i in data) {
 if (Object.prototype.hasOwnProperty.call(data, i)) {
 this.frameData[i] = data[i]; 
}
}
   };

   // 改变状态
   @action changeStatus = (ids, expect) => {
      this.frameData.data = toJS(this.frameData.data).map((i) => {
 ids.includes(i.fileid) && (i.status = expect); return i; 
});
   };
}

export default TransportStore;
